package com.dog.basics.security.service;

import cn.hutool.core.util.ObjectUtil;
import io.swagger.models.auth.In;
import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.userdetails.User;

import java.util.Collections;

/**
 * 用户详细信息
 */
@Getter
public class DogUser extends User {

	/**
	 * 用户ID
	 */
	private Long userId;

	private String bizUserId;

	@Setter
	private String pic;

	@Setter
	private String name;

	@Setter
	private boolean setPassword;

	@Setter
	private boolean competitionArea;

	@Setter
	private boolean debugger;

	@Setter
	private Integer flage;
	public DogUser(Long userId, String bizUserId, boolean enabled, String password, Integer flage) {
		super(bizUserId, password, enabled, true, true, true, Collections.emptyList());
		this.userId = userId;
		this.bizUserId = bizUserId;
		this.flage = flage;
		setPassword = (ObjectUtil.isNull(password) || password.equals("-1")) ? true : false;
	}
}
